export const setToken = (token: string) => sessionStorage.setItem('token', token);

export const getToken = () => sessionStorage.getItem('token');

export const removeToken = () => sessionStorage.removeItem('token');
//@ts-ignore
export const serverUrl = SERVER_URL;

export const uploadActionUrl = serverUrl + '/common/upload';

export const dalImg = (url: string) => {
  if (url) {
    if (url.startsWith('http')) return url;
    return serverUrl + url;
  } else {
    return 'https://images1.meinali.com/upload/doctor/2020/04/14/69a46699bc91560e.jpg';
  }
};
